﻿namespace IPlugin
{
    /// <summary>
    /// 远程调用请求
    /// </summary>
    public class RpcRequest
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }
        /// <summary>
        /// 方法
        /// </summary>
        public string Method { get; set; }
        /// <summary>
        /// 请求唯一ID
        /// </summary>
        public string RequestId { get; set; }
        /// <summary>
        /// 请求参数
        /// </summary>
        public Dictionary<string, object> Params { get; set; }

        public override string ToString()
        {
            return $"Method:{Method},RequestId:{RequestId},Params:{Newtonsoft.Json.JsonConvert.SerializeObject(Params)}";
        }
    }
}
